import { Injectable } from '@angular/core';
import { _HttpClient } from '@delon/theme';

@Injectable({
  providedIn: 'root'
})
export class ShipStatService {

	tShipForecastUrl = 'tjpn4-handle-tally/tShipForecast/';
	tShipBillStatusUrl = 'tjpn4-handle-tally/tShipBillStatus/';
	shipBillStorageUrl = 'tjpn4-handle-tally/shipBillStorage/';
	api = {
		shipListForShipStatPage: this.tShipForecastUrl + 'shipListForShipStatPage',
		shipExpBillStatPage: this.tShipBillStatusUrl + 'shipExpBillStatPage',
		shipExpBillStatTotal: this.tShipBillStatusUrl + 'shipExpBillStatTotal',
		shipImpBillStatPage: this.tShipBillStatusUrl + 'shipImpBillStatPage',
		shipImpBillStatTotal: this.tShipBillStatusUrl + 'shipImpBillStatTotal',
		shipBillStatUpdate: this.tShipBillStatusUrl + 'updateStatus',
		clearStorage: this.shipBillStorageUrl + 'clearStorage?transportBillId=',
		storagePage: this.shipBillStorageUrl + 'shipBillStoragePage',
		storageTotal: this.shipBillStorageUrl + 'shipBillStorageTotal',
		shipStatTallyPage: this.tShipBillStatusUrl + 'shipStatTallyPage'
	};
	constructor(private http: _HttpClient) {
	}

	shipListForShipStatPage(params: any) : any {
		return this.http.get(this.api.shipListForShipStatPage, params);
	}

	shipExpBillStatPage(params: any) : any {
		return this.http.get(this.api.shipExpBillStatPage, params);
	}

	shipExpBillStatTotal(params: any) : any {
		return this.http.get(this.api.shipExpBillStatTotal, params);
	}

	shipImpBillStatPage(params: any) : any {
		return this.http.get(this.api.shipImpBillStatPage, params);
	}

	shipImpBillStatTotal(params: any) : any {
		return this.http.get(this.api.shipImpBillStatTotal, params);
	}

	updateShipBillStatus(postData: any): any {
		return this.http.post(this.api.shipBillStatUpdate, postData);
	}

	clearStorage(id: string): any {
		return this.http.post(this.api.clearStorage + id);
	}

	storagePage(params: any): any {
		return this.http.get(this.api.storagePage , params);
	}

	storageTotal(params: any): any {
		return this.http.get(this.api.storageTotal , params);
	}

	shipStatTallyPage(params: any): any {
		return this.http.get(this.api.shipStatTallyPage , params);
	}
}
